package cn.hamster3.hamsterworld.command;

import cn.hamster3.hamsterworld.core.DataManager;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

public class ReloadCommand extends CommandBase {
    public ReloadCommand(DataManager dataManager) {
        super(dataManager);
    }

    @Override
    public String getPermission() {
        return "hw.admin";
    }

    @Override
    public boolean isPlayerCommand() {
        return false;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args[0].equalsIgnoreCase("reload")) {
            dataManager.reload();
            sender.sendMessage("§a插件重载完成!");
            return true;
        }
        return true;
    }
}
